package com.wx.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wx.mapper.UserMapper;
import com.wx.pojo.User;
import com.wx.service.UserService;
@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserMapper userMapper;
	
	/*@Override
	public User findUserById(int id) {
		
		User user=userMapper.findUserById(id);
		return user;
	}

	@Override
	public List<User> findUser() {
		// TODO Auto-generated method stub
		return userMapper.findUser();
	}
*/
	/**
	 * 添加用户信息数据库
	 */
	@Override
	public void insertUser(User user) {
		 userMapper.insertUser(user);
	}

	@Override
	public User findUserByphoneAndPassword(User user) {
		return userMapper.findUserByphoneAndPassword(user);
		
	}

	@Override
	public User findUserById(String id) {
		return userMapper.findUserById(id);
		
	}

	@Override
	public List<User> findUserByPhone(String phone) {
		return userMapper.findUserByPhone(phone);
	}

	@Override
	public void alterUser(User user) {
		userMapper.alterUser(user);
		
	}

	@Override
	public void alterUserPasswordByPhone(User user) {
		userMapper.alterUserPasswordByPhone(user);
		
	}

	
	
	
}
